﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 继承测试_MM路径
{
	class Year : CalendarUnit
	{
		public Year(int year)
		{
			SetCurrentPos(year);//msg21
		}

		public int GetYear()
		{
			return m_currentPos;
		}

		public override bool Increment()
		{
			m_currentPos += 1;
			return true;

		}

		public bool IsLeap()
		{
			bool isLeap = false;

			if ((m_currentPos % 4 == 0) && (!(m_currentPos % 100 == 0))
				|| m_currentPos % 400 == 0)
			{
				isLeap = true;
			}
			else
			{
				isLeap = false;
			}
			return isLeap;
		}
	}
}
